#include<stdio.h>
int any(int z)
{
	int count = 0;
	int i = 0;
	for (i = 0;i < 32;i++)//while(z)
	{
		if ((z & 1) == 1)//z%2=1
		{
			count++;
				z =z>1;//z/2
		}
	}
	return count;
}
int main()
{
	/*int a, b, c;
	a = 5;
	c = ++a;
	b = (++c, c++, ++a, a++);*/
	int b = 0;
	scanf_s("%d", &b);
	int s = any(b);
	printf("%d", s);
	return 0;
}